package com.kundi.dooradmin.service;

import com.kundi.dooradmin.entity.SuccessExample;
import com.kundi.dooradmin.mapper.SuccessExampleMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author 赵恒
 * Date 2020/6/19
 */
@Service
public class SuccessExampleService {
    @Resource
    SuccessExampleMapper successExampleMapper;

    public List<SuccessExample> getAll() {
        return successExampleMapper.selectAll();
    }

    public int insert(SuccessExample successExample) {
        return successExampleMapper.insertSelective(successExample);
    }

    public int update(SuccessExample successExample) {
        return successExampleMapper.updateByPrimaryKey(successExample);
    }

    public int delete(Integer id) {
        return successExampleMapper.deleteById(id);
    }

    public SuccessExample getExampleById(Integer id) {
        return successExampleMapper.getExampleById(id);
    }
}
